package testUnit;

import static org.junit.Assert.*;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import FamilyTherapy.SayActCard;

public class testSayActCard {

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testSayActCard() {
		boolean isNew=false;
		SayActCard s=new SayActCard(0);
		
		if(s!=null)
			isNew=true;
		assertEquals(true,isNew);
	}

	@Test
	public void testDisplayDescription() {
		final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
		System.setOut(new PrintStream(outContent));
		
	
		//if (newLine == null) newLine = "\n";
		
		SayActCard s = new SayActCard(0);
		s.displayDescription();
		
		String expected = "Description :" + "SA1_Say \"I love you\" to parents\n";
		
		assertEquals(expected,outContent.toString());
	}

	@Test
	public void testGetPoint() {
		SayActCard s = new SayActCard(0);
		int result = s.getPoint();
		assertEquals(result, 3);	}

}
